﻿<%@ Page Language="C#" MasterPageFile="~/Samples.master"  Codebehind="TreeView.aspx.cs"
	Inherits="Sample.TreeView" Title="Folks TreeView Sample" %>

<asp:Content ID="treeViewContent" ContentPlaceHolderID="bodyContentPlaceHolder" runat="server">
	<div id="app">
		<h3>
			TreeView</h3>
		<div class="note">
			The TreeView web control doesn't works with FolksContainer. For enabling it, just
			add the rel="folks" attribute.
		</div>
		<br />
		<asp:TreeView rel="folks" ID="sampleTreeView" runat="server" ImageSet="Arrows" OnSelectedNodeChanged="sampleTreeView_SelectedNodeChanged"
			OnTreeNodeCollapsed="sampleTreeView_TreeNodeCollapsed" OnTreeNodeExpanded="sampleTreeView_TreeNodeExpanded">
			<ParentNodeStyle Font-Bold="False" />
			<HoverNodeStyle Font-Underline="True" ForeColor="#5555DD" />
			<SelectedNodeStyle Font-Underline="True" ForeColor="#5555DD" HorizontalPadding="0px"
				VerticalPadding="0px" />
			<Nodes>
				<asp:TreeNode Text="1 - Item" Value="1 - Item">
					<asp:TreeNode Text="1.1 - Item" Value="1.1 - Item">
						<asp:TreeNode Text="1.1.1 - Item" Value="1.1.1 - Item"></asp:TreeNode>
						<asp:TreeNode Text="1.1.2 - Item" Value="1.1.2 - Item"></asp:TreeNode>
						<asp:TreeNode Text="1.1.3 - Item" Value="1.1.3 - Item"></asp:TreeNode>
					</asp:TreeNode>
					<asp:TreeNode Text="1.2 - Item" Value="1.2 - Item"></asp:TreeNode>
					<asp:TreeNode Text="1.3 - Item" Value="1.3 - Item"></asp:TreeNode>
				</asp:TreeNode>
			</Nodes>
			<NodeStyle Font-Names="Tahoma" Font-Size="10pt" ForeColor="Black" HorizontalPadding="5px"
				NodeSpacing="0px" VerticalPadding="0px" />
		</asp:TreeView>
		<hr size="1" />
		<asp:Label ID="sampleLabel" runat="server"></asp:Label>
	</div>
	<div id="aspx">
		<h4>ASPX</h4>
		<pre class="code_fixed sh_html">
&lt;div class="note"&gt;
	The TreeView web control doesn't works with FolksContainer. For enabling it, just add the rel="folks" attribute.
&lt;/div&gt;
&lt;br /&gt;
&lt;asp:TreeView <strong>rel="folks"</strong> ID="TreeView1" runat="server" ImageSet="Arrows" OnSelectedNodeChanged="sampleTreeView_SelectedNodeChanged"
	OnTreeNodeCollapsed="sampleTreeView_TreeNodeCollapsed" OnTreeNodeExpanded="sampleTreeView_TreeNodeExpanded"&gt;
	&lt;ParentNodeStyle Font-Bold="False" /&gt;
	&lt;HoverNodeStyle Font-Underline="True" ForeColor="#5555DD" /&gt;
	&lt;SelectedNodeStyle Font-Underline="True" ForeColor="#5555DD" HorizontalPadding="0px"
		VerticalPadding="0px" /&gt;
	&lt;Nodes&gt;
		&lt;asp:TreeNode Text="1 - Item" Value="1 - Item"&gt;
			&lt;asp:TreeNode Text="1.1 - Item" Value="1.1 - Item"&gt;
				&lt;asp:TreeNode Text="1.1.1 - Item" Value="1.1.1 - Item"&gt;&lt;/asp:TreeNode&gt;
				&lt;asp:TreeNode Text="1.1.2 - Item" Value="1.1.2 - Item"&gt;&lt;/asp:TreeNode&gt;
				&lt;asp:TreeNode Text="1.1.3 - Item" Value="1.1.3 - Item"&gt;&lt;/asp:TreeNode&gt;
			&lt;/asp:TreeNode&gt;
			&lt;asp:TreeNode Text="1.2 - Item" Value="1.2 - Item"&gt;&lt;/asp:TreeNode&gt;
			&lt;asp:TreeNode Text="1.3 - Item" Value="1.3 - Item"&gt;&lt;/asp:TreeNode&gt;
		&lt;/asp:TreeNode&gt;
	&lt;/Nodes&gt;
	&lt;NodeStyle Font-Names="Tahoma" Font-Size="10pt" ForeColor="Black" HorizontalPadding="5px"
		NodeSpacing="0px" VerticalPadding="0px" /&gt;
&lt;/asp:TreeView&gt;
&lt;hr size=1 /&gt;
&lt;asp:Label ID="Label1" runat="server"&gt;&lt;/asp:Label&gt;
		</pre>
	</div>
	<div id="source">
		<h4>Source</h4>
		<pre class="code_fixed sh_csharp">
namespace Sample
{
	public partial class TreeView : System.Web.UI.Page
	{
		protected void sampleTreeView_TreeNodeCollapsed(object sender, TreeNodeEventArgs e)
		{
			sampleLabel.Text = e.Node.Text + " was collapsed.";
		}

		protected void sampleTreeView_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
		{
			sampleLabel.Text = e.Node.Text + " was expanded.";
		}

		protected void sampleTreeView_SelectedNodeChanged(object sender, EventArgs e)
		{
			if (sampleTreeView.SelectedNode != null)
				sampleLabel.Text = sampleTreeView.SelectedNode.Text + " was selected.";
		}
	}
}
		</pre>
	</div>
</asp:Content>
